# Include the directory itself as a path to include directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Add Sources
set(NTTW_SOURCES timing array image prime number32)
# Add Headers into List
file(GLOB NTTW_HEADERS ${NTTW_SOURCE_DIR}/include/*.h) 

# 64-bit Build?
set (NTTW_64 ON) #True
#set (NTTW_64 OFF) #False

#Add compiler flags
add_definitions (-DNTTW_DLL -DNTTW_MAKEDLL)
if (NTTW_64)
	add_definitions (-DNTTW_64)
endif (NTTW_64)

# Create a library called "nttw" which includes the source files.
# The extension is already found. Any number of sources could be listed here.
include_directories (${NTTW_SOURCE_DIR}/include) 
add_library (nttw SHARED ${NTTW_SOURCES}) 

# Set the build version (VERSION) and the API version (SOVERSION)
SET_TARGET_PROPERTIES(nttw
                      PROPERTIES
                      VERSION 1.2.3
                      SOVERSION 1)

# Installation of the Library
# Installs the header files
install(FILES ${NTTW_HEADERS} DESTINATION "include/nttw")
# Installs the library
install(TARGETS nttw
        DESTINATION "lib"
        PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)